<div class="layui-form" lay-filter="layuiadmin-form-shengji" style="padding: 20px 30px 0 0;margin: 0 auto;">
    <div class="layui-tab" id="demo" lay-filter="demo" lay-allowclose="true">

        <ul class="layui-tab-title">

            <li lay-id="1" class="mydemo layui-this">控制板升级</li>

            <li lay-id="2" class="mydemo">工控板升级</li>


        </ul>

        <div class="layui-tab-content">

            <div class="layui-tab-item layui-show">
                <div class="layui-form-item">
                    <label class="layui-form-label">网路类型：</label>
                    <div class="layui-input-inline">
                        <script type="text/html" template>
                            <select class="layui-input-inline" name="TYPE1" value="{{ d.params.TYPE || '' }}" id="" lay-filter="mySelect">
                               <option value="0">WIFI</option>
                               <option value="1">以太网</option>
                            </select>
                        </script>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">服务器IP地址</label>
                    <div class="layui-input-inline">
                        <script type="text/html" template>
                            <input type="text" name="IP1" value="{{ d.params.IP || '' }}" lay-verify="" placeholder="请输入值" autocomplete="off" class="layui-input">
                        </script>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">端口号：</label>
                    <div class="layui-input-inline">
                        <script type="text/html" template>

                            <input type="text" name="PORT1" value="{{ d.params.PORT || '' }}" lay-verify="" placeholder="请输入值" autocomplete="off" class="layui-input">
                        </script>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-inline">
                        <input type="button" lay-submit lay-filter="LAY-user-back-gkbsj1" value="确认" data-type="bbbb" class="layui-btn">
                    </div>
                </div>
            </div>

            <div class="layui-tab-item">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label">网路类型：</label>
                        <div class="layui-input-inline">
                            <script type="text/html" template>
                                <select class="layui-input-inline" name="TYPE2" value="{{ d.params.TYPE || '' }}" id="" lay-filter="mySelect">
                                   <option value="0">WIFI</option>
                                   <option value="1">以太网</option>
                                </select>
                            </script>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">服务器IP地址</label>
                        <div class="layui-input-inline">
                            <script type="text/html" template>
                                <input type="text" name="IP2" value="{{ d.params.IP || '' }}" lay-verify="" placeholder="请输入值" autocomplete="off" class="layui-input">
                            </script>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">端口号：</label>
                        <div class="layui-input-inline">
                            <script type="text/html" template>
                                <input type="text" name="PORT2" value="{{ d.params.PORT || '' }}" lay-verify="" placeholder="请输入值" autocomplete="off" class="layui-input">

                            </script>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-inline">
                            <input type="button" lay-submit lay-filter="LAY-user-back-gkbsj2" value="确认" data-type="aaaa" class="layui-btn">
                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>
</div>
<style>
    .layui-form-select .layui-input {
        border-radius: 8px;
        background-color: #F5F5F5;
    }
    
    .layui-form-label {
        min-width: 90px;
    }
    
    .layui-tab-content {
        padding: 30px;
        box-sizing: border-box;
    }
</style>
<script type="text/javascript">
    layui.use(['element', 'jquery'], function() {
        var $ = layui.jquery;

        var element = layui.element;



        $("#add").click(function() {
            element.tabAdd('demo', {
                title: '选项卡的标题'

                ,
                content: '选项卡的内容' //支持传入html

            });

        })

        $("#change").click(function() {
            element.tabChange('demo', '2');

        })

        $("#delete").click(function() {
            element.tabDelete("demo", "4");

        })

        $("#deleteAll").click(function() {
            var lis = $(".mydemo");

            $.each(lis, function(index, item) {
                var layid = item.getAttribute("lay-id");

                //alert(layid);

                element.tabDelete("demo", layid);

            });

        })

    });
</script>